<%@ page import="java.util.Date" %>
<%@ page import="java.text.DateFormat" %>
<%@ page import="java.text.SimpleDateFormat" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/12/12
  Time: 14:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>空气质量信息维护页面</title>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.8.3.min.js"></script>
</head>
<body>
    <h1>空气质量信息维护页面</h1>
    <form action="${pageContext.request.contextPath }/changeairs" method="get">
        <span>监测区域:</span>
        <select name="queryDistrict">
            <c:if test="${districtList != null }">
                <option value="0">--请选择--</option>
                <c:forEach var="district" items="${districtList}">
                    <option <c:if test="${district.id == districtId}">selected="selected"</c:if>
                            value="${districtId}">${district.name}</option>
                </c:forEach>
            </c:if>
        </select><br>
        <c:if test="${Exceptioncha!=null}">
            <%out.print("<script>alert('更改错误!')<script>");%>
        </c:if>
        <span>监测日期:</span>
        <input type="text" name="monitorTime" value=""/><br>
        <span>PM10值:</span>
        <input type="text" name="pm10" value=""/><br>
        <span>PM25值:</span>
        <input type="text" name="pm25" value=""/><br>
        <span>监测站</span>
        <input type="text" name="monitoringStation" value=""/><br>
        <input type="hidden" name="id" id="id" value="${id}"/>
        <%
            Date date = new Date();
            SimpleDateFormat now = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        %>
        最后修改时间:<%=now.format(date) %><br>
        <input type="submit" value="更新"/>
        <input type="button" value="删除" onclick="window.location.href='${pageContext.request.contextPath}/del?delid=${id}'"/>
    </form>
</body>
</html>
